<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
    <link href="/center/static/css/comm.css" rel="stylesheet" type="text/css">
    <link href="/center/static/css/child.css" rel="stylesheet" type="text/css">
	</head>
	<body>
    <div class="main" id="main" v-cloak v-if="utoken">
      <div class="hd">
        <h1>管理中心</h1>
      </div>
      <div v-if="loading" class="loading" ><div class="loadline"></div></div>
      <div v-else class="mc">
        <div class="sm">
          <div class="cle l_f" onclick="parent.toMenu(2)">
            <h1>文章总量</h1>
            <h2>{{ list[0] }}</h2>
          </div>
          <div class="cle l_f" onclick="parent.toMenu(3)">
            <h1>分类总量</h1>
            <h2>{{ list[1] }}</h2>
          </div>
          <div class="cle l_f" onclick="parent.toMenu(4)">
            <h1>标签总量</h1>
            <h2>{{ list[2] }}</h2>
          </div>
          <div class="cle l_f" onclick="parent.toMenu(5)">
            <h1>评论总量</h1>
            <h2>{{ list[3] }}</h2>
          </div>
          <div class="cle l_f" onclick="parent.toMenu(6)">
            <h1>友链总量</h1>
            <h2>{{ list[4] }}</h2>
          </div>
          <div class="fle">
            <h1>待处理事宜</h1>
            <div class="fline"></div>
          </div>
          <div class="cle l_r" onclick="parent.toMenu(2)">
            <h1>未发布文章</h1>
            <h2>{{ list[5] }}</h2>
          </div>
          <div class="cle l_r" onclick="parent.toMenu(5)">
            <h1>待审核评论</h1>
            <h2>{{ list[6] }}</h2>
          </div>
          <div class="cle l_r" onclick="parent.toMenu(6)">
            <h1>待审核友链</h1>
            <h2>{{ list[7] }}</h2>
          </div>
          <div class="cle l_t ss" v-if="sysSet">
            <h3>系统设置</h3>
            <div class="svi" v-if="sysView">
              <div class="ssli">
                <span>加速配置：</span>
                <p>{{ sysSet.cdnUrl  }}</p>
              </div>
              <div class="ssli">
                <span>自动任务：</span>
                <p>{{ sysSet.taskTime  }}</p>
              </div>
              <div class="ssli">
                <span>任务状态：</span>
                <p>{{ sysSet.taskStatus==0?'未启动':'启动'  }}</p>
              </div>
              <div class="ssli">
                <span>上次执行：</span>
                <p>{{ sysSet.taskLastRun  }}</p>
              </div>
              <button type="button" v-if="sysSet.taskStatus == 0" class="btnblue btnred abs" @click="runTask">启动任务</button>
              <button type="button" v-if="urlView" class="btnblue" @click="toSave(false)">编辑</button>
            </div>
            <div class="sed" v-else>
              <div class="ssli">
                <span>加速配置：</span>
                <input type="text" v-model="sysSet.cdnUrl" placeholder="请输入加速域名" />
              </div>
              <div class="ssli">
                <span>自动任务：</span>
                <input type="number" v-model="sysSet.taskTime" placeholder="请输入每日自动任务启动时0-24" />
              </div>
              <button type="button" class="btnblue" @click="save">保存</button>
            </div>
          </div>
          <div class="cle l_t ss" v-if="sysSet">
            <h3>社媒设置</h3>
            <div class="svi" v-if="urlView">
              <div class="ssli">
                <span>QQ：</span>
                <p>{{ sysSet.qqUrl  }}</p>
              </div>
              <div class="ssli">
                <span>GitHub：</span>
                <p>{{ sysSet.githubUrl  }}</p>
              </div>
              <div class="ssli">
                <span>Gitee：</span>
                <p>{{ sysSet.giteeUrl  }}</p>
              </div>
              <div class="ssli">
                <span>EMail：</span>
                <p>{{ sysSet.emailUrl  }}</p>
              </div>
              <button type="button" v-if="sysView" class="btnblue" @click="toSave(true)">编辑</button>
            </div>
            <div class="sed" v-else>
              <div class="ssli">
                <span>QQ：</span>
                <input type="text" v-model="sysSet.qqUrl" placeholder="请输入QQ链接" />
              </div>
              <div class="ssli">
                <span>GitHub：</span>
                <input type="text" v-model="sysSet.githubUrl" placeholder="请输入GitHub链接" />
              </div>
              <div class="ssli">
                <span>Gitee：</span>
                <input type="text" v-model="sysSet.giteeUrl" placeholder="请输入Gitee链接" />
              </div>
              <div class="ssli">
                <span>EMail：</span>
                <input type="text" v-model="sysSet.emailUrl" placeholder="请输入EMail链接" />
              </div>
              <button type="button" class="btnblue" @click="save">保存</button>
            </div>
          </div>
        </div>
      </div>
    </div>
    <script src="/static/lib/jquery/jquery-3.6.0.min.js"></script>
    <script src="/static/lib/vue/vue.min.js"></script>
    <script src="/static/lib/vue/vue-axios.js"></script>
    <script src="/static/lib/vue/axios.min.js"></script>
    <script src="/center/static/js/comm.js?v=1.0"></script> 
     <script src="/center/static/js/api.js"></script>
     <script src="/static/js/popup.js"></script>  
    <script src="/center/static/js/main.js?v=1.0"></script>  
	</body>
</html>
